package cn.sheep.violet.bean

/**
  * author: old sheep
  * QQ: 64341393 
  * Created 2018/10/15
  */
class SheepString(val str: String) {

    def toIntPlus = {
        try {
            this.str.toInt
        } catch {
            case _: Exception => 0
        }
    }

    def toDoublePlus = {
        try {
            this.str.toDouble
        } catch {
            case _: Exception => 0d
        }
    }
}

object SheepString {

    implicit def StrCrossOverSheep(str: String) = new SheepString(str)

}
